//
//  LDSYYYTableCell.m
//  TestCategory
//
//  Created by kai_leedarson on 2017/11/8.
//Copyright © 2017年 maple_leedarson. All rights reserved.
//

#import "LDSYYYTableCell.h"
#import "LDSYYYModel.h"
@implementation LDSYYYTableCell

- (void)viewSetup {
    
}

- (void)frameSetup {
    
}

- (void)setModel:(LDSYYYModel *)model
{
    [super setModel:model];
    if (model) {
        //将model 的数值 传递给 cell
        self.textLabel.text = model.text;
        self.imageView.image = [UIImage imageNamed:model.imageName];
        self.detailTextLabel.text = model.detailInfo;
        if (model.changeColor) {
            self.textLabel.textColor = [UIColor lightTextColor];
            self.detailTextLabel.textColor = [UIColor lightTextColor];
            self.backgroundColor = [UIColor colorWithRed:2/255.0 green:155/255.0 blue:231/255.0 alpha:1.0];
        }else {
            self.textLabel.textColor = [UIColor darkTextColor];
            self.detailTextLabel.textColor = [UIColor darkTextColor];
            self.backgroundColor = [UIColor whiteColor];
        }
    }
}

+ (CGFloat)height {
    return 55.0f;
}
@end
